package com.lanmao.blog.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.lanmao.blog.entity.Tags;
import com.lanmao.blog.entity.Type;
import com.lanmao.blog.entity.User;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 用于前台首页出参
 */
@Data
public class FristBlog {
    @JsonSerialize(using = ToStringSerializer.class) //系统序列化时，保留相关精度
    private Long id;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "Asia/ShangHai")
    private LocalDateTime createTime ;

    private String description;

    private String firstPicture;

    private String flag;

    private String title;


    private Integer views;

    private Long commentCount;

    private Type type;

    private User user;

    private List<Tags> tags;
}
